/* 全局样式 */
:root {
    --primary-color: #2196f3;
    --secondary-color: #43cea2;
    --accent-color: #ff9800;
    --bg-color: #f5f7fa;
    --card-bg: #fff;
    --text-color: #222;
    --border-radius: 14px;
    --box-shadow: 0 4px 16px rgba(33,150,243,0.08);
    --transition: 0.3s cubic-bezier(.4,2,.6,1);
}

body {
    font-family: 'Segoe UI', 'Arial', sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
}

/* 导航栏样式 */
.navbar {
    border-radius: 0 0 18px 18px;
    box-shadow: 0 2px 12px rgba(30, 34, 90, 0.08);
}

.sidebar-nav {
    background: #fff;
    padding: 18px 0 18px 0;
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(30, 34, 90, 0.10);
    margin-bottom: 24px;
}

.sidebar-nav .list-group-item {
    font-size: 1.1em;
    font-weight: 500;
    color: #1a237e;
    border: none;
    background: transparent;
    transition: background 0.2s, color 0.2s;
}

.sidebar-nav .list-group-item:hover {
    background: #e3f2fd;
    color: #ff4081;
}

.banner {
    background: linear-gradient(90deg, #43cea2 0%, #185a9d 100%);
    color: #fff;
    box-shadow: 0 4px 24px rgba(30, 34, 90, 0.10);
}

/* 卡片样式 */
.card, .card-body {
    border-radius: var(--border-radius) !important;
    box-shadow: var(--box-shadow);
    background: var(--card-bg);
    transition: box-shadow var(--transition), transform var(--transition);
}

.card:hover {
    box-shadow: 0 8px 32px rgba(33,150,243,0.16);
    transform: translateY(-4px) scale(1.02);
}

.stat-card .card-title {
    font-size: 1.1em;
    font-weight: 600;
}

.stat-card .card-text {
    font-size: 2em;
    font-weight: bold;
}

.book-card {
    min-width: 180px;
    max-width: 180px;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(30, 34, 90, 0.10);
    margin-right: 16px;
    background: #fff;
    transition: transform 0.2s;
}

.book-card:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 8px 24px rgba(30, 34, 90, 0.16);
}

.book-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-bottom: 1px solid #eee;
}

/* 按钮样式 */
.btn-primary, .btn-info, .btn-secondary, .btn-danger {
    border: none;
    border-radius: 8px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0,188,212,0.08);
    transition: background 0.3s, transform 0.3s;
}

.btn-primary {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    color: #fff;
}

.btn-primary:hover {
    background: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
    box-shadow: 0 4px 16px var(--primary-color, #2196f3, 0.2);
    transform: scale(1.04);
}

.btn-info {
    background: #00bcd4;
    color: #fff;
}

.btn-info:hover {
    background: #0097a7;
}

.btn-secondary {
    background: #fff;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: var(--border-radius);
    transition: background var(--transition), color var(--transition), box-shadow var(--transition);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 2px 8px var(--primary-color, #2196f3, 0.12);
}

.btn-danger {
    background: #ff4081;
    color: #fff;
}

.btn-danger:hover {
    background: #c51162;
}

/* 评分系统样式 */
.rating {
    color: #ffd600;
    font-size: 1.3em;
    letter-spacing: 1px;
}

/* 书评样式 */
.review {
    background: #f8fafd;
    padding: 18px 20px;
    border-radius: 12px;
    margin-bottom: 18px;
    box-shadow: 0 2px 8px rgba(30, 34, 90, 0.06);
}

/* 排行榜样式 */
.ranking-list {
    list-style: none;
    padding: 0;
}

.ranking-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    margin-bottom: 8px;
    background: none;
    border-radius: 8px;
    transition: background var(--transition);
}

.ranking-item:hover {
    background: #f1f8ff;
}

.ranking-number {
    font-size: 1.3em;
    font-weight: bold;
    color: var(--secondary-color);
    margin-right: 12px;
}

/* AI对话样式 */
.ai-chat {
    background: linear-gradient(120deg, #e3f2fd 60%, #fce4ec 100%);
    border-radius: 18px;
    padding: 32px 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 24px rgba(0,188,212,0.10);
    animation: fadeIn 1s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: none; }
}

.ai-message {
    background: #fff;
    padding: 18px 20px;
    border-radius: 12px;
    margin-bottom: 14px;
    box-shadow: 0 2px 8px rgba(30, 34, 90, 0.08);
    animation: fadeIn 0.7s;
}

/* 表单美化 */
input[type="text"], input[type="password"], input[type="email"], textarea, select {
    border-radius: 8px;
    border: 1px solid #cfd8dc;
    padding: 8px 12px;
    font-size: 1em;
    transition: border-color 0.3s, box-shadow 0.3s;
}

input:focus, textarea:focus, select:focus {
    border-color: #00bcd4;
    box-shadow: 0 0 0 2px #b2ebf2;
    outline: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar-nav {
        margin-bottom: 20px;
    }
    
    .card {
        margin: 10px 0;
    }
    
    .banner {
        padding: 18px 8px;
    }
    
    .book-card {
        min-width: 140px;
        max-width: 140px;
        height: auto;
    }
    
    .book-card img {
        height: 160px;
    }
}

#logout-form {
  display: inline;
}
#logout-form button {
  padding: 0;
  margin: 0;
}

.popular-books-row {
    overflow-x: auto;
    padding-bottom: 8px;
}
.book-card-modern {
    min-width: 140px;
    max-width: 140px;
    border-radius: 18px;
    box-shadow: 0 2px 8px rgba(30, 34, 90, 0.10);
    background: #fff;
    transition: transform 0.22s, box-shadow 0.22s;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 14px 10px 10px 10px;
    margin-bottom: 0;
    border: none;
}
.book-card-modern:hover {
    transform: translateY(-6px) scale(1.04);
    box-shadow: 0 8px 24px rgba(30, 34, 90, 0.16);
    z-index: 2;
}
.book-cover-img, .book-cover-placeholder {
    width: 80px;
    height: 110px;
    border-radius: 10px;
    object-fit: cover;
    background: #e3f2fd;
    margin-bottom: 8px;
}
.book-title {
    font-weight: 600;
    margin-bottom: 2px;
    color: #1a237e;
    word-break: break-all;
}
.book-author {
    color: #607d8b;
    font-size: 0.95em;
}
@media (max-width: 768px) {
    .book-card-modern {
        min-width: 110px;
        max-width: 110px;
        padding: 8px 4px 8px 4px;
    }
    .book-cover-img, .book-cover-placeholder {
        width: 60px;
        height: 80px;
    }
}

h1, h2, h3, h4, h5 {
  font-weight: 700;
  color: var(--primary-color);
}

.sidebar-nav a, .sidebar-nav li {
  border-radius: var(--border-radius);
  transition: background var(--transition), color var(--transition);
}

.sidebar-nav a:hover {
  background: var(--primary-color);
  color: #fff;
}

/* 其它美化可按需继续扩展 */

